Configuring: SQL Update

Select one or more fields to be used in the SET and/or WHERE query. The resulting modified dataset will contain the updates made during the SET query.

Worked example: SQL update

Steps to configure

  1. SQL SET clause: Enter a customized SET clause for the update.

  2. SQL WHERE clause: Enter a WHERE clause filter.

  3. Execute: The dataset will be modified, listing the updated fields.

Step 1: SQL SET clause

Enter the SET clause to update the SQL query by using the fields listed in the right window. The SET clause will define the new values to be listed for a particular field - either relevant to all the values in the field, or only to values that comply with the WHERE expression, to be configured in the next step.

  • Double click a field name to include that field in the SET clause.

  • The operation can only be executed if the syntax is ok. If the syntax is not correct, the [Next] and [Finish] buttons will be disabled. If the syntax is incorrect, an error message will be shown in the Output window.

  • Default: a blank query text box.

  • Minimum configuration: the user must define a valid update query.

Step 2: SQL WHERE clause

Enter a WHERE clause to use as filter for the update. The WHERE clause will define conditions that need to be met in order for the values to be included in the new dataset. This clause must contain one or more Boolean expressions, which can be combined using the logical operators: and, or, and not.

  • This step is optional. If no conditions are specified during this step, the SET clause previously configured will be applied to all specified values.

  • This query adds more specification for the exact location of where the SET query should update the values of the selected field/s.

  • You can use any field/s in the dataset for your WHERE query. These fields are listed in the window next to the WHERE query text box.

  • Double click a field name to include that field in the WHERE clause.

  • To write the Boolean WHERE expression, select the field using the [<] key, supply a Boolean operator, and list a condition. Check the syntax of the expression using the [green check] button. The output of the expression will be listed in the window below.The operation can only be executed if the syntax is ok. If the syntax is not correct, the [Next] and [Finish] buttons will be disabled. If the syntax is incorrect, an error message will be shown in the Output window.

  • Once you are satisfied that the expressions listed satisfy all the WHERE conditions required, select [Next] to continue configuration by ordering the fields, or [Finish] to create the new dataset.

  • Default: a blank query text box.

  • Minimum configuration: the user must define a valid filter query.

SQL query:

For every updated field that is entered by the user, this query will be used:

UPDATE

[TableName]

SET

[Set Clause]

WHERE

[Where Clause]

Step 3: Execute

The dataset will be modified to contain the updated fields.


Related topics:

  

CSense 2023- Last updated: June 24,2025